<template>
	<div>
		<div class="g-doc">
			<header>订单</header>
			<!-- 搜索框 -->
			<div class="search_all" style="display: none;">
				<span>所有人...</span>
				<i class="rfloat"></i>
				<ul class="person_list">
					<li id="45">二傻子哟</li>
					<li id="46">外勤测试员001</li>
					<li id="53">可跌</li>
				</ul>
			</div>
			<div class="search_bar">
				<div class="all"><span>全部...</span><i class="rfloat"></i></div>
				<div class="search_box">
					<i class="to_left"></i><input type="text" placeholder="输入手机号进行搜索" name="mobile">
				</div>
				<ul class="select_list">
					<li class="clearfix"><span class="lfloat">全部</span></li>
					<li class="clearfix"><span class="lfloat">待确认</span><i class="rfloat "></i></li>
					<li class="clearfix"><span class="lfloat">待提交</span><i class="rfloat wait_icon"></i></li>
					<li class="clearfix"><span class="lfloat">待初审</span><i class="rfloat wait_trial_icon"></i></li>
					<li class="clearfix"><span class="lfloat">补全资料</span><i class="rfloat wait_data_icon"></i></li>
					<li class="clearfix"><span class="lfloat">待银行审核</span><i class="rfloat wait_bank_icon"></i></li>
					<li class="clearfix"><span class="lfloat">审批通过</span><i class="rfloat wait_pass_icon"></i></li>
					<li class="clearfix"><span class="lfloat">待终审</span><i class="rfloat wait_Final_icon"></i></li>
					<li class="clearfix"><span class="lfloat">终审完毕</span><i class="rfloat Final_Over_icon"></i></li>
					<li class="clearfix"><span class="lfloat">订单完成</span><i class="rfloat order_finsh_icon"></i></li>
				</ul>
				<div class="search"><i class="search_icon"></i><span>搜索</span></div>
			</div>
			<!-- 订单列表 -->
			<ul class="order_list" v-for="item in orderlist">
				<router-link :to="{path:'/list_detail/item.id',name:'list_detail',params:{id:item.id}}" style="display:block;">
				<li class="b_rejection" >
					<!--@click="linkto();"-->
					<h3>{{item.status_name}}</h3>
					<div class="info">
						<div class="title">申请人：</div>
						<div class="msg">{{item.true_name}}</div>
					</div>
					<div class="info">
						<div class="title">电话：</div>
						<div class="phone">
							<a class="phone_num" href="tel:item.mobile">{{item.mobile}}</a>
						</div>
					</div>
					<div class="info">
						<div class="title">汽车经纪商</div>
						<div class="company_name">{{item.side_b}}</div>
					</div>
					<div class="info">
						<div class="title">贷款额度：</div>
						<div class="company_name">{{item.total_money}}元</div>
					</div>
					<div class="info">
						<div class="title">申请时间:</div>
						<div class="status">{{item.addtime}}</div>
					</div>
					<hr class="yellow_hr">
					<p class="num">{{item.order_sn}}</p>
					
				</li>
				</router-link>
				<!--<routerview></routerview>-->
			</ul>
			<footer>
				<div class="footer_bar clearfix">
					<!--<a href="javascript:void(0);" class="home"></a>-->
					<router-link to="/" class="home"></router-link>
					<router-link to="/order_list" class="dingdans"></router-link>
					<router-link to="/busin_list" class="cheshang"></router-link>
					<router-link to="/me" class="geren"></router-link>
				</div>
			</footer>
		</div>
		<!--loadding-->
		<div class="loading" :class="{loading_show:l_show}">
			<div class="loading_box">
				<img src="/static/img/0.gif" alt="loading">
			</div></div>
		</div>
	</div>
</template>

<script>
	import sha1 from '../../static/js/sha/sha1'
	import common from '../../static/js/common'
	import axios from 'axios'
	import home from './home'
	var Mock = require("mockjs");
	var data = Mock.mock('order_list', {
		"code": 200,
		"data": [{
				"id": 1,
				"buser_id|1-20": 2,
				"addtime": "2018-03-03 12:29",
				"mobile": "18818122815",
				"order_sn": "B0102018030312196858",
				"side_b": "广州比比车汽车贸易有限公司",
				"status|-10--11": -11,
				"status_name": "B端拒绝",
				"total_money": "20000.00",
				"true_name": "nidaye"
			},
			{
				"id": 2,
				"buser_id|1-20": 3,
				"addtime": "2018-04-03 2:09",
				"mobile": "13818122862",
				"order_sn": "B0102628030312196870",
				"side_b": "广州陆陆科技有限公司",
				"status|-10--11": -11,
				"status_name": "B端拒绝",
				"total_money": "500000.00",
				"true_name": "haha"
			},
			{
				"id": 3,
				"buser_id|1-20": 4,
				"addtime": "2018-03-03 20:19",
				"mobile": "18818952816",
				"order_sn": "B0102018030312196851",
				"side_b": "广州bbc科技有限公司",
				"status|-10--11": -11,
				"status_name": "B端拒绝",
				"total_money": "250000.00",
				"true_name": "hehe"
			},
			{
				"id": 4,
				"buser_id|1-20": 5,
				"addtime": "2018-01-03 11:18",
				"mobile": "18918122815",
				"order_sn": "B0102018030312196830",
				"side_b": "广州哈士奇科技有限公司",
				"status|-10--11": -11,
				"status_name": "B端拒绝",
				"total_money": "2980000.00",
				"true_name": "enen"
			},
			{
				"id": 5,
				"buser_id|1-20": 6,
				"addtime": "2018-03-05 12:19",
				"mobile": "18618122813",
				"order_sn": "B0102018030312196870",
				"side_b": "广州哈哈科技有限公司",
				"status|-10--11": -11,
				"status_name": "B端拒绝",
				"total_money": "6020000.00",
				"true_name": "iii"
			},
			{
				"id": 6,
				"buser_id|1-20": 7,
				"addtime": "2018-03-03 12:16",
				"mobile": "15618122819",
				"order_sn": "B0102018030312196840",
				"side_b": "深圳itcast有限公司",
				"status|-10--11": -11,
				"status_name": "B端拒绝",
				"total_money": "2020000.00",
				"true_name": "oooo"
			},
			{
				"id": 7,
				"buser_id|1-20": 8,
				"addtime": "2017-05-03 16:29",
				"mobile": "15218122815",
				"order_sn": "B0102018030312196890",
				"side_b": "广州微信有限公司",
				"status|-10--11": -11,
				"status_name": "B端拒绝",
				"total_money": "6520000.00",
				"true_name": "wwww"
			},
			{
				"id": 8,
				"buser_id|1-20": 9,
				"addtime": "2017-08-03 1:09",
				"mobile": "13918122862",
				"order_sn": "B0102018030312196810",
				"side_b": "广州百度外卖有限公司",
				"status|-10--11": -11,
				"status_name": "B端拒绝",
				"total_money": "8020000.00",
				"true_name": "dddd"
			},
			{
				"id": 9,
				"buser_id|1-20": 1,
				"addtime": "2017-04-03 10:19",
				"mobile": "13418122896",
				"order_sn": "B0102018030312196896",
				"side_b": "广州饿了么有限公司",
				"status|-10--11": -11,
				"status_name": "B端拒绝",
				"total_money": "8420000.00",
				"true_name": "wunu"
			}

		],
		"message": "成功"
	})

	export default {
		name: "order_list",
		data() {
			return {
				orderlist:[],
				id:"",
				l_show:true
			}
		},
		methods: {
			c_title(title) {
				document.title = title;
			},
			get_OrderList() {
				var that = this;
				axios.get("order_list").then(function(res) {
//					console.log(res);
					var data = res.data;
					if(data.code == 200) {
						that.orderlist = data.data;
						that.l_show = false;
					}
				})
			},
//			跳轉
	linkto() {
		this.$router.push({
			name:"list_detail",path: '/list_detail',params:{"id":this.id}
	});
}
},
components:{home},
mounted() {
		this.c_title("订单列表");
			this.get_OrderList();
		}
	}
	
</script>

<style scoped>
	@import url("../../static/css/order.css");
</style>